<script setup lang="ts">
const props = defineProps(['index'])
const handleTabarChanged = (e: number) => {
    switch (e) {
        case 0:
            uni.navigateTo({
                url: '/pages/index/index'
            })
            break
        case 1:
            uni.navigateTo({
                url: '/pages/mine/index'
            })
            break
        default:
            break
    }
}
</script>
<template>
    <up-tabbar :value="props.index" :placeholder="false" :safeAreaInsetBottom="false" @change="handleTabarChanged">
        <up-tabbar-item text="首页" icon="home"></up-tabbar-item>
        <up-tabbar-item text="我的" icon="account"></up-tabbar-item>
    </up-tabbar>
</template>
<style lang="scss"></style>
<style lang="scss" scoped></style>